﻿using System;
using System.Collections.Generic;

using System.Text;
using System.Windows;
using System.Windows.Forms;
using Bixas.Tangibilis.Input;

namespace Bixas.Tangibilis.Controls
{
    public class TouchWindow : Window
    {
        public TouchWindow()
        {

        }

        protected override void OnSourceInitialized(EventArgs e)
        {
            base.OnSourceInitialized(e);
            if (Screen.AllScreens.Length > 1)
            {
                foreach (Screen scr in Screen.AllScreens)
                {
                    if (!scr.Primary)
                    {
                        this.Top = scr.WorkingArea.Top;
                        this.Left = scr.WorkingArea.Left;
                        this.Width = scr.WorkingArea.Width;
                        this.Height = scr.WorkingArea.Height;
                        this.Topmost = true;
                        break;
                    }
                }

            }
        }
        protected override void OnInitialized(EventArgs e)
        {
            base.OnInitialized(e);
            if (!System.ComponentModel.DesignerProperties.GetIsInDesignMode(this))
            {
                TouchSource.getInstance().CurrentWindow = this;
            }
        }
    }
}
